package priv.tuyou.bo;

import java.io.Serializable;

import com.alibaba.fastjson.JSON;

/**
 * app请求数据的公共类
 * @author 涂有
 */
public class AppData implements Serializable{

	private static final long serialVersionUID = -1609542424156586798L;
	
	/**
	 * 成功是否，1表示成功
	 */
	private int status = 1;
	
	/**
	 * 文字描述
	 */
	private String msg;
	
	/**
	 * 返回的数据
	 */
	private Object data;
	
	public AppData() {
		
		super();
	}
	
	public AppData(int status, String msg) {
		
		this(status, msg, null);
	}
	
	public AppData(int status, Object data) {
		
		this(status, null, data);
	}

	public AppData(int status, String msg, Object data) {
		
		super();
		this.status = status;
		this.msg = msg;
		this.data = JSON.toJSON(data);
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
}
